//package com.klinechart.presenter.info;
//
//import android.content.Context;
//import android.text.TextUtils;
//
//import com.klinechart.model.entity.res.TradePWDVerifyResult;
//import com.klinechart.model.info.LocalSp;
//import com.klinechart.model.info.UserModel;
//import com.klinechart.model.net.HttpObserver;
//import com.klinechart.presenter.base.BasePresenter;
//import com.klinechart.presenter.iview.IResult;
//import com.klinechart.presenter.iview.ITradePWDVerifyView;
//import com.klinechart.util.log.LogUtil;
//
///**
// * author:  TenFace
// * date:    2017/9/27
// * description: 查询股票列表
// */
//
//public class PlaceOrderPresenter extends BasePresenter<IResult> {
//
//    private static final String TAG = PlaceOrderPresenter.class.getSimpleName();
//    private UserModel mUserModel;
//
//    public PlaceOrderPresenter(IResult iResult) {
//        super(iResult);
//        mUserModel = UserModel.getInstance();
//    }
//
//    public void placeOrder(final Context context,  String password) {
//        mUserModel.verifyTradePassword(token, password, new HttpObserver<TradePWDVerifyResult>() {
//            @Override
//            public void onSuccess(TradePWDVerifyResult tradePWDVerifyResult) {
//                LogUtil.e(TAG, "查询成功！");
//                if (mIView != null) {
//                    mIView.createSSOTradePWDSuccess(tradePWDVerifyResult);
//                    //存入ssoTradeToken
//                    if (!TextUtils.isEmpty(tradePWDVerifyResult.getToken())) {
//                        LocalSp.getInstance(context).saveSSOTradeToken(tradePWDVerifyResult.getToken());
//                        LocalSp.getInstance(context).saveSSOTradeExpiredTime(tradePWDVerifyResult.getExpiredTime());
//                    }
//                }
//            }
//
//            @Override
//            public void onError(int errType, String errMessage) {
//                LogUtil.e(TAG, "失败码：" + errType + "》》信息：" + errMessage);
//                if (mIView != null) {
//                    mIView.createSSOTradePWDFail(errType, errMessage);
//                }
//            }
//        }, mIView.getLifeSubject());
//    }
//
//}
